<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html>
<html lang="en">
<head>
    <script type="text/javascript">
        var ctx = "${pageContext.request.contextPath}";
    </script>
    <title>login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <meta http-equiv="Cache-Control" content="no-store"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>

    <!-- basic styles -->
    <link href="${ctx}/static/ace/assets/css/bootstrap.css" rel="stylesheet"/>
    <!-- bootstrap.min.css -->

    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/font-awesome.min.css"/>

    <!--[if IE 7]>
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/font-awesome-ie7.min.css"/>
    <![endif]-->

    <!-- page specific plugin styles -->

    <!-- fonts
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />
    -->

    <!-- ace styles -->
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/ace.css"/>
    <!-- ace.min.css -->
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/ace-skins.min.css"/>

    <!-- dialog -->
    <link rel="stylesheet" href="${ctx}/static/component/bootstrap-dialog/bootstrap-dialog.css"/>
    <!-- 自动完成下拉 -->
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/select2.css"/>
    <link rel="stylesheet" href="${ctx}/static/component/select2/select2-bootstrap3.css"/>

    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/chosen.css"/>
    <!-- 校验 -->
    <link rel="stylesheet" href="${ctx}/static/component/bootstrapvalidator/bootstrapValidator.css"/>

    <!-- zTree -->
    <link rel="stylesheet" href="${ctx}/static/component/ztree/css/zTreeStyle/zTreeStyle.css"/>

    <!-- 日期组件 -->
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/datepicker.css"/>

    <!--[if lte IE 8]>
    <link rel="stylesheet" href="${ctx}/static/ace/assets/css/ace-ie.min.css"/>
    <![endif]-->


    <!-- custom css -->
    <link rel="stylesheet" href="${ctx}/static/extend/login.css"/>


    <!-- inline styles related to this page -->

    <!-- ace settings handler -->

    <script src="${ctx}/static/ace/assets/js/ace-extra.min.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

    <!--[if lt IE 9]>
    <script src="${ctx}/static/ace/assets/js/html5shiv.js"></script>
    <script src="${ctx}/static/ace/assets/js/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<div class="login-left hidden-xs">
</div>
<div class="login-right">
    <a class="rhslogo" href="#"></a>

    <div class="login-form">
        <h2>工作也要很快乐哟！</h2>

        <form action="${ctx}/login.do" method="post" class="form-horizontal">
            <input type="text" placeholder="您的用户名" name="username" class="form-control" >
            <input type="password" placeholder="您的密码" name="password" class="form-control">
			
			<%
                String error = (String) request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
                if (error != null) {
                    out.print("<span style='color: red;' id='errorPrint'>用户已失效或账号密码错误</span>");
                
                }
            %>
            <div class="login-btns">
                <button type="submit" class="btn btn-danger bnt-large">登陆</button>
            </div>
            
        </form>
    </div>
</div>
</body>
</html>